package main

import (
	"fmt"
)

type Operation struct {
	identifier string
	function func(int) int
}

func add(a int) int {
	return a + a
}

func substract(a int) int {
	return a - a
}

func main() {
	operations := []Operation {
		Operation {identifier: "add", function: add},
		Operation {identifier: "substract", function: substract},
	}

	fmt.Println(operations[0].function(10))
	fmt.Println(operations[1].function(10))
}
